#ifndef _FIND_EDGE_H
#define _FIND_EDGE_H


#include <vector>



class FindEdge
{
public:
	FindEdge(int ChannelSize, int ImgSize, int MoveStepSize){	//Channel Size, ImageSize, MoveSize, calcDistance
		CSize = ChannelSize;
		ISize = ImgSize;
		MSize = MoveStepSize;
		mStart = ImgSize / 2 - 50;
		mEnd = ImgSize / 2 + 50;
		bkgVec.resize(ImgSize, 0);
	}
	~FindEdge(){
	}
	int EvaluateImage(unsigned char*&buf, int rawSize, int ImgIndex);
	void Init();
	int getSubImg(int Ind);
	int CheckEdge(int Ind);
	int compAll(int Ind);
private:
	int calcEdgeLine(unsigned char*&buf, int rawSize, int checkSize);
	int getFirMax(int, int);
	int LintsIndex, MintsIndex, HintsIndex;
	int CSize, ISize, MSize;
	int mStart, mEnd;
	std::vector<int> bkgVec;
	std::vector<int> MeanInts; //
	std::vector<int> DifInts; //line to cutImage
};
#endif // _FIND_EDGE_H